﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MSAS.DIP.Common
{
    public static class DipLoggingCategory
    {
        /// <summary>
        /// Indicates that the log entry should go to the Windows Event Log
        /// </summary>
        public static string EventLog = "EventLog";
    }

    /// <summary>
    /// Event IDs used for logging. These event IDs are used for things going to
    /// the Windows Event Log and for things going to the rolling log file.
    /// 
    /// NOTE: Changing an established event ID may break the SCOM management pack!
    /// </summary>
    public enum EventIdType
    {
        InformationServiceStarting = 100,
        InformationServiceStarted = 101,
        InformationServiceStopping = 102,
        InformationServiceStopped = 103,
        InformationServiceContinuing = 104,
        InformationServiceContinued = 105,
        InformationServicePausing = 106,
        InformationServicePaused = 107,
        InformationServiceCustomCommandStart = 108,
        InformationServiceCustomCommandFinished = 109,
        InformationConfigurationInfo = 110,
        InformationWcfStarting = 111,
        InformationWcfStopping = 112,
        InformationServiceGeneral = 113,

        InformationConnectingToDatabase = 2001,
        InformationLoggingConfiguration = 2002,
        InformationSuccessfulDataProviderSftpUpload = 2003,
        InformationSuccessfullySetupComponent = 2004,
        InformationSuccessfulEnumeration = 2005,
        InformationSuccessfullyAddedWorkUnits = 2006,
        InformationSuccessfullyGotWorkUnits = 2007,
        InformationSuccessfullySetWorkUnitState = 2008,
        InformationSuccessfullyTransferedWorkUnit = 2009,
        InformationSuccessfullyProcessedWorkUnit = 2010,
        InformationSuccessfullyImportedWorkUnit = 2011,
        InformationEnumeratorHeartbeat = 2012,
        InformationTransfererProxyHeartbeat = 2013,
        InformationProcessorProxyHeartbeat = 2014,

        WarningDataChangedOnDataProviderDrop = 3001,
        WarningFailedToDeserializeEnumerationState = 3002,
        WarningFileVeryLarge = 3004,
        WarningInvalidFileOnShare = 3005, // TODO - May not want these to go to the event log
        WarningIncorrectFileName = 3006, // TODO - May not want these to go to the event log
        WarningFailedToEnumerateFiles = 3007,
        WarningFailedToAddWorkUnits = 3008,
        WarningFailedToGetWorkUnits = 3009,
        WarningFailedToSetWorkUnitState = 3010,
        WarningFailedToTransferWorkUnit = 3011,
        WarningFailedToProcessWorkUnit = 3012,
        WarningFailedToSetupComponent = 3013,
        WarningFailedToImportWorkUnit = 3014,

        ErrorGeneralTrackingSystemFailure = 4000, // N/A
        ErrorParsingDataProviderConfig = 4002, // TODO - Never used
        ErrorFailedToSerializeEnumerationState = 4003, // X
        ErrorFailedToGetDataProviderInfo = 4004, // X
        ErrorFailedToLookupTrackingSystemData = 4005, // N/A
        ErrorFailedToTransferWorkUnit = 4006, // X
        ErrorUnhandledDataProvider = 4007, // X
        ErrorFileTooLarge = 4008, // X
        ErrorFailedDataProviderSftpUpload = 4009, // X
        ErrorFailedToSetupComponent = 4010, // X
        ErrorFailedToProcessWorkUnit = 4011, // X
        ErrorFailedToImportWorkUnit = 4012, // X
        ErrorFailedToGetWorkUnit = 4013, // X
        ErrorFailedToSetWorkUnitState = 4014, // X
        ErrorFailedToAddWorkUnits = 4015, // X
        ErrorFailedToEnumerateFiles = 4016, // X
        ErrorPerfCounterCannotBeIncremented = 4017,
        ErrorHighResolutionTimerNotSupported = 4018,
        ErrorEventLimitReachedForFilenameWarnings = 4019,

        CriticalServiceStartFailed = 201, // X
        CriticalFailureDuringServiceStop = 202, // X
        CriticalCheckConfigFailed = 203, // X
        CriticalConfigLoadFailed = 204, // X
        CriticalServiceContinueFailed = 205, // X
        CriticalServicePauseFailed = 206, // X
        CriticalServiceCustomCommandFailed = 207, // X
        CriticalPerfCountersCategoryNotFound = 208,
        CriticalPerfCounterCannotBeCreated = 209,

        CriticalCannotResetRootPathOnDataProvider = 5001, // X
        CriticalUnhandledExceptionInEnumerator = 5002, // X
        CriticalUnhandledExceptionInProcessorProxy = 5003, // X
        CriticalCannotInitializeEnumerator = 5004, // X
        CriticalUnhandledExceptionInComponentProxy = 5005, // X
        CriticalCannotMoveFileOnSftpUpload = 5006 // X
    }
}
